package com.kayden.aop.proxy;

public class HouseProxy implements HouseSubject{

    private HouseSubject subject;


    public HouseProxy(HouseSubject subject) {
        this.subject = subject;
    }

    @Override
    public void saleHouse() {
        System.out.println("我是中介，我帮房东开始代理");
        subject.saleHouse();
        System.out.println("我是中介，我帮房东结束代理");
    }


    @Override
    public void rentHouse() {
        System.out.println("我是中介，我帮房东开始代理");
        subject.rentHouse();
        System.out.println("我是中介，我帮房东结束代理");
    }
}
